<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/jstl/c" prefix="c" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
    <html:base />
    
    <title>经销商密码初始化</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<script type="text/javascript" language="javascript">
		function checkForm()
		{
		  
		}	
		
		//提交
		function tijiao()
		{
		
		
 //获取显示选中的参数
		    var type =document.forms['adminDealerForm'].type;
		   
             var param='';
		    if(type.length!=null)
		    {
				   for(var i=0;i<type.length;i++)
				    {
				     
				       if(type[i]!=null  && type[i].checked)
				       {
				          if(param=='' && param.indexOf(',')==-1)
					      {
				            param +=  type[i].value;
					      }
					      else
					      {
					       param += ',' + type[i].value;
					      }
				        
				       }
				    }
		    }
		    else
		    {
			   
		    }
		    var checkType = document.getElementById('checkType');
		    checkType.value=param;
		    
		    //alert('checkType.value:'+checkType.value);
		    
		   document.forms['adminDealerForm'].submit();
		    return true;
		}
	</script>
  </head>
  
  <body>
		<html:form action="/admin/dealer/add.do?action=edit_grade">
		<input type="hidden" name="bkpage" value="${param['bkpage']}"/>
<input type="hidden" name="bkisCommend" value="${param['isCommend']}"/>
<input type="hidden" name="bkifCheck" value="${param['ifCheck']}"/>
<input type="hidden" name="bkhyType" value="${param['hyType']}"/>
<input type="hidden" name="bkprovId" value="${param['provId']}"/>
<input type="hidden" name="bkcityId" value="${param['cityId']}"/>
<input type="hidden" name="bkqyjb_cpName" value="${qyjb_cpName}"/>
			<table>
			<tr>
				<td>用户ID：${singleDealer.userid} 
				<html:hidden property="userid" value="${singleDealer.userid}"/> </td>
			</tr>
			<tr>
				<td>用户名称：${singleDealer.cpName}</td>
			</tr>
			<tr>
				<td>当前招商通等级：&nbsp;<font color="red">${singleDealer.attractBusinessManGrade}</font>,
					当前网购通等级：&nbsp;<font color="red">${singleDealer.gradeclass}</font>
					&nbsp;&nbsp;（注：0:普通 1：银牌 2：金牌 4：配件）
				</td>
			</tr>
			
			<tr>
			    <td>
<%--			       如果是招商通  --%>
			      <c:if test="${singleDealer.attractBusinessManType!=null && singleDealer.attractBusinessManType!=''  && singleDealer.attractBusinessManType=='1'  }">
			         <input type="checkbox" id="type" name="type" value="3" checked="checked">招商通</input>
			      </c:if>
			      <c:if test="${singleDealer.attractBusinessManType!='1'}">
			          <input type="checkbox" id="type" name="type" value="3">招商通</input>
			      </c:if>
			      
<%--			       如果是网购通  --%>
			      <c:if test="${singleDealer.saleBusinessManType!=null && singleDealer.saleBusinessManType!=''  && singleDealer.saleBusinessManType=='1'  }">
			        <input type="checkbox" id="type" name="type" value="2" checked="checked">网购通</input>
			      </c:if>
			      <c:if test="${singleDealer.saleBusinessManType!='1'}">
			        <input type="checkbox" id="type" name="type" value="2">网购通</input>
			      </c:if>
			      
			      <input type="hidden"  id="checkType" name="checkType" value=""></input>
			        
			    </td>
			</tr>
			
			<tr>
				<td>招商通等级修改：
					<html:select property="attractBusinessManGrade" size="1" value="${singleDealer.attractBusinessManGrade}">
					    <html:option value="0">普通会员</html:option>
						<html:option value="2">金牌会员</html:option>
						<html:option value="1">银牌会员</html:option>
					</html:select>
				</td>
			</tr>
			
			<tr>
				<td>网购通等级修改：
					<html:select property="gradeclass" size="1" value="${singleDealer.gradeclass}">
						<html:option value="0">普通会员</html:option>
						<html:option value="2">金牌会员</html:option>
						<html:option value="1">银牌会员</html:option>
						<html:option value="4">配件会员</html:option>
					</html:select>
				</td>
			</tr>
			
			<tr>
				<td>
				  
				  <input type="button"  value="提交 "   title="提交"  onclick="return tijiao();"/>
                </td>
			</tr>
			</table>
		</html:form>
  </body>
</html:html>
